function  [ChoiceProbIJ]=ChoiceProbIJ_hom_FEdemoshrt_WTP_vs(param)


global state week J T S MT MTvector K WB param_nopt...
price_num rebate_estar_num kwh_num elec_num estar_num standard0_num standard10_num standard15_num standard20_num standard25_num rank_num ...
price_denom rebate_estar_denom rebate_denom kwh_denom elec_denom estar_denom standard0_denom standard10_denom standard15_denom standard20_denom standard25_denom rank_denom ...
bchoice bchoice_s bchoice_ij id_i id_j id_ij id_m id_n  demo pidnest choicenest_ij brandweek_denom brandweek_num prod_denom prod_num denom_tmp2 denom_tmp3 denom...
type_id2_3_demo1_num type_id2_3_demo1_denom type_id3_demo1_num type_id3_demo1_denom AV_demo1_num AV_demo1_denom  ice_sc_demo1_num ice_sc_demo1_denom...
type_id2_3_demo2_num type_id2_3_demo2_denom type_id3_demo2_num type_id3_demo2_denom AV_demo2_num AV_demo2_denom  ice_sc_demo2_num ice_sc_demo2_denom...
type_id2_3_demo3_num type_id2_3_demo3_denom type_id3_demo3_num type_id3_demo3_denom AV_demo3_num AV_demo3_denom  ice_sc_demo3_num ice_sc_demo3_denom...
type_id2_3_demo4_num type_id2_3_demo4_denom type_id3_demo4_num type_id3_demo4_denom AV_demo4_num AV_demo4_denom  ice_sc_demo4_num ice_sc_demo4_denom...
type_id2_3_demo5_num type_id2_3_demo5_denom type_id3_demo5_num type_id3_demo5_denom AV_demo5_num AV_demo5_denom  ice_sc_demo5_num ice_sc_demo5_denom...
type_id2_3_demo6_num type_id2_3_demo6_denom type_id3_demo6_num type_id3_demo6_denom AV_demo6_num AV_demo6_denom  ice_sc_demo6_num ice_sc_demo6_denom;

global id;

global LLC_5_18;

 %Parameters
 J;
 param_nopt;
   alpha=[0;param_nopt(1:J-1,1)];
   eta=param(1,1);
   tau=param(2,1);
   pi=param(3,1);
   theta=param(4,1);
   %beta=param(4+1:4+12,1);
 
   FEprod_denom=alpha(prod_denom); 

 %Computations  
  denom_tmp1= FEprod_denom+eta*price_denom+eta*pi*rebate_estar_denom + eta*tau(1)*estar_denom+eta*theta(1)*LLC_5_18*elec_denom;
  				

  denom_tmp2=exp(denom_tmp1);
  denom_tmp3 = sparse(id_i,id_j,denom_tmp2,id_m,id_n);
  denom_tmp4=sum(denom_tmp3,1);
  denom=repmat(denom_tmp4,J,1);

  ChoiceProbIJ_tmp=denom_tmp3./denom;
  ChoiceProbIJ=ChoiceProbIJ_tmp(id_ij); 

end 











